package com.study.hot.newActivity

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import org.jetbrains.anko.button
import org.jetbrains.anko.linearLayout
import org.jetbrains.anko.sdk27.coroutines.onClick

/**
 * <pre>
 *     author : slx
 *     time   : 2020/04/13
 *     desc   :
 * </pre>
 */
class ResultActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        linearLayout {
            button {
                text = "返回结果"
                onClick {
                    setResult(Activity.RESULT_OK, Intent().putExtra("value", "Hello Fauks"))
                    finish()
                }
            }
        }
    }
}